package net.dntuan.simple.web.listener;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;

import org.apache.log4j.Logger;

/**
 * @author tuan.dang
 *
 * <br>$LastChangedRevision: 37 $
 * <br>$LastChangedDate: 2014-04-07 16:55:59 +0000 (Mon, 07 Apr 2014) $
 */
public class MyServletContextListener implements ServletContextListener {

	private static final Logger LOGGER = Logger.getLogger(MyServletContextListener.class);

	public MyServletContextListener() {
		LOGGER.info("initialize");
	}

	@Override
	public void contextInitialized(ServletContextEvent sce) {
		LOGGER.info("ServletContextListener is initialized before any servlet filter or servlet in web app!!!");
	}

	@Override
	public void contextDestroyed(ServletContextEvent sce) {
		LOGGER.info("destroy servlet context");
	}

}
